<?php
class VipViewModel extends ViewModel{
	protected $tableName='order';//关键字
	protected $viewFields=array(
		 'order'=>array(
			'id'=>'oid','number','total','status','time',
			'_as'=>'orders'  //表改名，下边条件时也要改
			),
		'order_list'=>array(
			'id'=>'lid','quantity','subtotal','mark',
			'_on'=>'order_list.oid=orders.id'
			),
		'goods'=>array(
			'id'=>'gid','name','unit','listpic',
			'_on'=>'order_list.gid=goods.id'
			)
		);
}
?>